Ext.onReady(function(){
	var loginForm = new Ext.form.FormPanel({
		renderTo:'loginForm',
		width:'300',
		height:'200',
		frame:true,
		items:
		[
			{xtype:'textfield',vtype:'email',name:'email',fieldLabel:'email'},
			{xtype:'textfield',inputType:'password',fieldLabel:'password',name:'password'},
			{
				xtype:'textfield',
				name:'vcode',
				fieldLabel:'Validation Code'
			},
			{	
				xtype:'label',
				html:'<a href="#"><img id="vcImage" src="GetValidationCodeServlet"/></a>'
			}
		],
		buttons:
		[
			{
				text:'Login!',
				handler:function(){
					loginForm.getForm().getEl().dom.action='register!login.action';
					loginForm.getForm().getEl().dom.submit();
				}
			}
		],
		html:'<a href="reg.jsp">register</a>'
	})
})